import { createSlice } from "@reduxjs/toolkit";

// 初始化的数据
const initialState = {
  articleContentData: "",
};

// 创建Slice
const artilceSlice = createSlice({
  name:"articleContent",
  initialState,
  reducers:{
    setArticleContent(state,{payload}){
      // console.log(action)
      state.articleContentData = payload
    }
  }
})

// 导出action
export const { setArticleContent } = artilceSlice.actions
// 导出reducer
export default artilceSlice.reducer
